const router = require('koa-router')();
/*引入子集路由*/
const openApi = require('./component/openApi/qushenghuo.js');
const music = require('./component/music.js');
// const wxOauth2 = require('./component/wx/wxOauth2.js');
const tb_tbk = require('./component/tbk/tb_tbk.js');
const user = require('./component/user/user.js');

/*项目后台管理总路由*/
const back = require('./back.js');

/*路由附属-主路径*/
router.prefix('/main/v1');

/*微信认证流程*/
// router.use('/wxOauth2', wxOauth2.routes(), wxOauth2.allowedMethods());
/*开放Api -- 趣生活*/
router.use('/openApi', openApi.routes(), openApi.allowedMethods());
/*淘宝-淘宝客api*/
router.use('/tb_tbk', tb_tbk.routes(), tb_tbk.allowedMethods());
/*用户模块*/
router.use('/user', user.routes(), user.allowedMethods());
/*音乐模块*/
router.use('/music', music.routes(), music.allowedMethods());

/*后台管理-淘宝客api*/
router.use(back.routes(), back.allowedMethods());

module.exports = router;
